/*
 * @Author: your name
 * @Date: 2020-12-10 10:35:38
 * @LastEditTime: 2020-12-28 10:59:50
 * @LastEditors: Please set LastEditors
 * @Description: 首页
 * @FilePath: \gitee-WeBi\js\zz\home\home.js
 */
/* "访问" --- 侧边栏数据 */
var sideMenuData0 = [
    {
        title: "首页",
        iconSrc:"../../../images/sideMenu/icon1.png",
        url: ""
    },
    {
        title: "业务报表",
        iconSrc:"../../../images/sideMenu/icon2.png",
        url: "../bbb/bbb.html"
    },
    {
        title: "效能报表",
        iconSrc:"../../../images/sideMenu/icon3.png",
        url: ""
    },
];
/* "配置" --- 侧边栏数据 */
var sideMenuData1 = [
    {
        title: "报表",
        iconSrc:"",
        url: "../config_reportForm/index.html",
        children:[
            {
                title: "报表11",
                iconSrc:"",
                url: "../config_reportForm1/index11.html"
            },
            {
                title: "报表12报表12报表12报表12报表12报表12",
                iconSrc:"",
                url: "../config_reportForm1/index12.html",
            },
            {
                title: "报表13报表13报表13报表13报表13报表13",
                iconSrc:"",
                url: "../config_reportForm1/index13.html",
            },
            {
                title: "报表14报表14报表14报表14报表14报表14",
                iconSrc:"",
                url: "../config_reportForm1/index14.html",
            },
            {
                title: "报表15报表15报表15报表15报表15报表15",
                iconSrc:"",
                url: "../config_reportForm1/index15.html",
            },
            {
                title: "报表16报表16报表16报表16报表16报表16",
                iconSrc:"",
                url: "../config_reportForm1/index16.html",
            },
            {
                title: "报表17报表17报表17报表17报表17报表17",
                iconSrc:"",
                url: "../config_reportForm1/index17.html",
            },
            {
                title: "报表18报表18报表18报表18报表18报表18",
                iconSrc:"",
                url: "../config_reportForm1/index18.html",
                children:[
                    {
                        title: "222---报表18报表18报表18报表18报表18报表18"
                    }
                ]
            },
            {
                title: "报表19报表19报表19报表19报表19报表19",
                iconSrc:"",
                url: "../config_reportForm1/index19.html",
            },
            {
                title: "报表20报表20报表20报表20报表20报表20",
                iconSrc:"",
                url: "../config_reportForm1/index20.html",
            },
            {
                title: "报表21报表21报表21报表21报表21报表21",
                iconSrc:"",
                url: "../config_reportForm1/index21.html",
                children:[
                    {
                        title:"naofnaofnoawf",
                        children:[
                            {
                                title:"naofnaofnoawf686"
                            }
                        ]
                    }
                ]
            }
        ]
    },
    {
        title: "新增报表",
        iconSrc:"",
        url: "../add_reportForm/index.html",
        hidden:true // --- 不创建菜单项
    },
    {
        title: "用户",
        iconSrc:"",
        url: "../config_user/index.html",
        children:[
            {
                title:"naofnaofnoawf",
                url: "../config_reportForm1/indexyh1.html",
            },
            {
                title:"naofnaofnoawf",
                url: "../config_reportForm1/indexyh2.html",
            },
            {
                title:"naofnaofnoawf",
                url: "../config_reportForm1/indexyh3.html",
            },
            {
                title:"naofnaofnoawf",
                url: "../config_reportForm1/indexyh4.html",
            },
            {
                title:"naofnaofnoawf",
                url: "../config_reportForm1/indexyh5.html",
            },
            {
                title:"naofnaofnoawf",
                url: "../config_reportForm1/indexyh6.html",
            }
        ]
    }
];
/*  */
$.when($.ready).done(function(){
    //alert(location.search);
    //console.log("---zzGetHrefQueryString---",zzGetHrefQueryString("type"));
    // --- 根据地址栏的参数 type curPath 展示对应的模块（访问 or 配置）
    var type = zzGetHrefQueryString("type");
    window.zzType = type;
    //alert(type);
    var curPath = zzGetHrefQueryString("curPath");
    var realType = type!==null?type:1;
    //alert(realType);
    console.log("---type---",type);
    console.log("---curPath---",curPath);
    // --- 存vue对象 --- 子页面调用
    window.zz_$vue = new Vue({
        el:"#zz-main_wrap",


        mixins:[zzMixinBI],


        data:{
            // 页面容器标识
            tabIndex:realType,
            // 侧边栏数据
            sideMenuData0:sideMenuData0, // 访问
            sideMenuData1:sideMenuData1  // 配置
        },


        computed:{


        },


        created(){


        },


        mounted(){
            // 创建tab对象
            window[zzTabsObjectName+"0"] = new zzTab({
                xh:0,
                //initUrl:"../aaa/aaa.html",
                //initTabTitle:"首页0"
                showAfterInit:this.tabIndex==0
            });
            window[zzTabsObjectName+"1"] = new zzTab({
                xh:1,
                initUrl:"../config_reportForm/index.html",
                initTabTitle:"报表",
                showAfterInit:this.tabIndex==1
            });
        },


        watch:{


        },


        methods:{
            // 页面容器切换
            changePageWrap(index){
                this.tabIndex = index;
            }

        },


        components:{


        }


    })
});
